# \author  Neil Turton <neilt@amd.com>
#  \brief  Nanotube unit tests.
#   \date  2020-08-02
#
###########################################################################
# Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
###########################################################################
Import('env')

env.add_libnanotube()
env.Append(CPPPATH=[env['SOURCE_TOP'].Dir('testing/support/include')])
env.Append(CPPPATH=[Dir(env['XILINX_VITIS_HLS']+'/include')])
env.Append(LIBS=[env['BUILD_TOP'].File('testing/support/libtest_support.a')])


unit_tests = (
    'array_maps',
    'channels',
    'duplicate_bits',
    'hash_maps',
    'init_mask',
    'packets',
    'rotate_down',
    'shift_down_bits',
    'tap_map_array',
    'tap_map_cam',
    'tap_packet_resize',
    'tap_packet_read',
    'tap_packet_write',
    'threads',
    'timers'
)
for unit in unit_tests:
    env.Program('test_'+unit,
                ['test_'+unit+'.cpp',
                 env['BUILD_TOP'].File('libnt/libnanotube.a')])

